package com.practice.aaDatatype001.integertype;

/**
 * @author yangdejun
 * @date 2020/10/20
 **/
public class LongTest {
    public static void main(String[] args) {
        long a = 127;
        long b = 128;
        long c = -128;
        long d = -129;

        Long e = 127L;
        Long f = 127L;
        Long g = new Long(127);

        Long h = 128L;
        Long i = 128L;
        Long j = new Long(128);

        Long k = -128L;
        Long l = -128L;
        Long m = new Long(-128);

        Long n = -129L;
        Long o = -129L;
        Long p = new Long(-129);

        System.out.println(a == e);            // true
        System.out.println(a == g);            // true
        System.out.println(e == f);            // true
        System.out.println(e == g);            // false
        System.out.println(e.equals(a));       // true
        System.out.println(g.equals(a));       // true
        System.out.println(e.equals(f));       // true
        System.out.println(e.equals(g));       // true
    }
}
